function reload(){
	var chcCustName = $("#chcCustName").val();
	var chcLinkman = $("#chcLinkman").val();
	var chcTitle = $("#chcTitle").val();
	console.log(chcCustName);
	console.log(chcLinkman);
	console.log(chcTitle);
    window.location.href="salc/scPage?chcCustName="+chcCustName+"&chcLinkman="+chcLinkman+"&chcTitle="+chcTitle;
}
function reloadGo(){
	var pageNo = $("#pageNo").val();
    window.location.href="salc/scPage?pageNo="+pageNo;
}
function help(msg){
	alert('欢迎使用'+msg);
}

function to(url){
	window.location.href=url;
}
function back(){
	window.history.back();
}
function save(url){
	alert('保存成功！');
	to(url);
}
function add(url){
	alert('新建成功！');
	to(url);
}
function del(msg){
	if (window.confirm("确认删除"+msg+"？")){
		reload();
	}
}
function setCurTime(oid){
	var now=new Date();
	var year=now.getFullYear();
	var month=(parseInt(now.getMonth())+1).toString();
	var day=now.getDate();
	var hours=now.getHours();
	var minutes=now.getMinutes();
	var seconds=now.getSeconds();
	var timeString = year+"-"+month+"-"+day+" "+hours+":"+minutes+":"+seconds;
	var oCtl = document.getElementById(oid);
	oCtl.value = timeString;
}

function formatDate(date) {
    var year=date.getFullYear();
    var month=date.getMonth()+1;
    var thisDate=date.getDate();
    var fdate=year+"-"+month+"-"+thisDate;
    return fdate;
}
function toDDMMMYYYY(date) {
    var d = new Date(date.getTime());
    var dd = d.getDate() < 10 ? "0" + d.getDate() : d.getDate().toString();
    var mmm = d.getMonth();
    var yyyy = d.getFullYear().toString(); //2011
    //var YY = YYYY.substr(2);   // 11
    return 	 yyyy+"-"+mmm+"-"+dd;
}